/*
 * @Author: ziqi jhzq12345678
 * @Date: 2024-10-08 09:07:24
 * @LastEditors: ziqi jhzq12345678
 * @LastEditTime: 2024-10-18 15:42:13
 * @FilePath: /pornhub_app/lib/src/components/short_widget/deduct_base_cell.dart
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import 'package:pornhub_app/utils/color.dart';

import '../../assets/assets.dart';
import '../../assets/styles.dart';
import '../marqueer/marqueer_list.dart';
import '../../model/deduct/deduct_models.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class DeductBaseCell extends StatelessWidget {
  final DeductTypeModel deducts;

  const DeductBaseCell({super.key, required this.deducts});

  @override
  Widget build(BuildContext context) {
    if (!deducts.status) {
      return const SizedBox.shrink();
    }
    return Align(
      alignment: Alignment.centerLeft,
      child: Container(
        height: 30.w,
        padding: EdgeInsets.symmetric(horizontal: 10.w),
        decoration: BoxDecoration(
          color: COLOR.hexColor('#FFF0F0'),
          borderRadius: Styles.borderRaidus.m,
        ),
        child: Row(
          mainAxisSize: MainAxisSize.min,
          children: [
            Image.asset(Assets.iconNotice, width: 16.w, height: 16.w),
            SizedBox(width: 10.w),
            Expanded(child: MarqueerList.deducts(deducts)),
          ],
        ),
      ),
    );
  }
}
